/* 定义用户信息的数据类型 */

// 基础类型
export interface ResponseData {
    code: number,
    message: string,
    ok: boolean
}

// 验证码接口数据类型
export interface UserCodeData extends ResponseData {
    data: string
}

// 用户登录请求携带的参数类型
export interface LoginData {
    phone: string,
    code: string
}

// 用户登录接口返回的用户数据的类型
export interface UserInfo {
    name: string,
    token: string
}

// 用户登录接口返回的数据类型
export interface UserInfoData extends ResponseData {
    data: UserInfo
}

// 微信扫码登录参数接口返回的 data 数据类型
export interface WxLogin {
    "redirectUri": string,
    "appid": string,
    "scope": string,
    "state": string
}

// 微信扫码登录参数接口返回的数据类型
export interface WxLoginData extends ResponseData {
    data: WxLogin
}

// 获取订单
export interface OrderInfo {
    "id": number,
    "createTime": string,
    "updateTime": string,
    "isDeleted": number,
    "param": {
        "orderStatusString": string
    },
    "userId": number,
    "outTradeNo": string,
    "hoscode": string,
    "hosname": string,
    "depcode": string,
    "depname": string,
    "scheduleId": string,
    "title": string,
    "reserveDate": string,
    "reserveTime": number,
    "patientId": number,
    "patientName": string,
    "patientPhone": string,
    "hosRecordId": string,
    "number": number,
    "fetchTime": string,
    "fetchAddress": string,
    "amount": number,
    "quitTime": string,
    "orderStatus": number
}
export interface OrderInfoData extends ResponseData {
    data: OrderInfo
}

// 取消订单
export interface CancelOrderData extends ResponseData {
    data: boolean
}

// 下单生成二维码
export interface CreateNative {
    "codeUrl": string,
    "orderId": number,
    "totalFee": number,
    "resultCode": string
}
export interface CreateNativeData extends ResponseData {
    data: CreateNative
}

// 用户信息
export interface MemberInfo {
    "id": number,
    "createTime": string,
    "updateTime": string,
    "isDeleted": number,
    "param": {},
    "openid": null,
    "nickName": null,
    "phone": string,
    "name": string,
    "certificatesType": string,
    "certificatesNo": string,
    "certificatesUrl": null,
    "authStatus": number,
    "status": number
}
export interface MemberInfoData extends ResponseData {
    data: UserInfo
}

// 证件类型
export interface CertificationType {
    "createTime": string,
    "dictCode": string,
    "hasChildren": boolean,
    "id": number,
    "isDeleted": number,
    "name": string,
    "param": {},
    "parentId": number,
    "updateTime": string,
    "value": string
}
export type CertificationTypeArr = CertificationType[]
export interface CertificationTypeResponse extends ResponseData {
    data: CertificationTypeArr
}

// 会员认证
export interface UserAuahData {
    "certificatesNo": string,
    "certificatesType": string,
    "certificatesUrl": string,
    "name": string
}

// 用户订单信息
export interface UserOrderInfo {
    id: number;
    createTime: string;
    updateTime: string;
    isDeleted: number;
    param: {
        orderStatusString: string
    };
    userId: number;
    outTradeNo: string;
    hoscode: string;
    hosname: string;
    depcode: string;
    depname: string;
    scheduleId?: any;
    title: string;
    reserveDate: string;
    reserveTime: number;
    patientId: number;
    patientName: string;
    patientPhone: string;
    hosRecordId: string;
    number: number;
    fetchTime: string;
    fetchAddress: string;
    amount: number;
    quitTime: string;
    orderStatus: number;
}
export type UserOrderInfoArr = UserOrderInfo[]
export interface UserOrderInfoResponse extends ResponseData {
    data: {
        records: UserOrderInfoArr;
        total: number;
        size: number;
        current: number;
        orders: any[];
        hitCount: boolean;
        searchCount: boolean;
        pages: number;
    }
}

// 所有就诊人
export interface PatientInfo {
    id: number;
    createTime: string;
    updateTime: string;
    isDeleted: number;
    param: {
        certificatesTypeString?: string;
        contactsCertificatesTypeString?: any;
        cityString?: any;
        fullAddress: string;
        districtString?: any;
        provinceString?: any;
    };
    userId: number;
    name: string;
    certificatesType: string;
    certificatesNo: string;
    sex: number;
    birthdate?: string;
    phone: string;
    isMarry: number;
    provinceCode?: any;
    cityCode?: any;
    districtCode?: any;
    address: string;
    contactsName: string;
    contactsCertificatesType: string;
    contactsCertificatesNo: string;
    contactsPhone: string;
    isInsure: number;
    cardNo?: any;
    status: string;
}
export type PatientInfoArr = PatientInfo[]
export interface PatientInfoResponse extends ResponseData {
    data: PatientInfoArr
}

// 所有订单状态
export interface OrderStatusResponse extends ResponseData {
    data: OrderStatusArr;
}
export interface OrderStatus {
    comment: string;
    status: number;
}
export type OrderStatusArr = OrderStatus[]

// 城市信息
export interface City {
    id: number,
    createTime: string,
    updateTime: string,
    isDeleted: number,
    param: {},
    parentId: number,
    name: string,
    value: string,
    dictCode: null,
    hasChildren: boolean
}
export type CityArr = City[]
export interface CityResponse extends ResponseData {
    data: CityArr
}

// 添加/修改就诊人所需要的数据
export interface AddOrUpdateData {
    address: string,
    addressSelected:string[],
    birthdate: string,
    certificatesNo: string,
    certificatesType: string,
    contactsCertificatesNo: string,
    contactsCertificatesType: string,
    contactsName: string,
    contactsPhone: string,
    id?: number,
    isInsure: number,
    isMarry: number,
    name: string,
    phone: string,
    sex: number,
}